package net.grandcentrix.thirtyinch.sample;

import net.grandcentrix.thirtyinch.TiLog;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

/**
 * 只是一个入口， 方便HelloAbility模拟实现recreate
 */
public class MainAbility extends Ability {
    @Override
    public void onStart(Intent _intent) {
        super.onStart(_intent);
        setUIContent(ResourceTable.Layout_stub_layout);// 必须设置ui后， 才能跳转

    }

    @Override
    protected void onActive() {
        super.onActive();
        TiLog.d("life", "MainAbility.onActive");
        Intent intent = new Intent();
        intent.setOperation(new Intent.OperationBuilder()
                .withDeviceId("")
                .withBundleName("net.grandcentrix.thirtyinch.sample")
                .withAbilityName("net.grandcentrix.thirtyinch.sample.HelloWorldActivity")
                .build());
        startAbility(intent);
    }
}
